<template>
  <div>
    <h1>搭配动画库animate.css实现</h1>
    <button @click="isShow = !isShow">显示/隐藏</button>
    <!-- 
        name: 自定义过渡动画类名称前缀，默认值 v
        appear: 首次渲染时是否应用过渡动画
     -->
    <transition
      appear
      name="animate__animated animate__bounce"
      enter-active-class="animate__swing"
      leave-active-class="animate__backOutDown"
    >
      <h1 v-show="isShow">Test</h1>
    </transition>
  </div>
</template>

<script>
export default {
  name: "Test",
  data() {
    return {
      isShow: true,
    };
  },
  methods: {},
};
</script>

<style scoped>
h1 {
  background-color: salmon;
  color: #fff;
  padding: 20px 50px;
  width: 300px;
}
</style>
